#include <stdio.h>
int main()
{
    unsigned int v;
    int i;
    scanf("%d", &v);
    printf("%x\n", v);
    unsigned char *p = (unsigned char *)&v;
    for (i = 0; i < sizeof(v); ++i)
    {
        if (i < 3)
        {
            if (sizeof(p[i]) == 1)
                printf("%.1x ", p[i]);
            else
                printf("%.2x ", p[i]);
        }
        else
        {
            int t = sizeof(p[i]);
            if (t == 1)
                printf("%.1x", p[i]);
            else
                printf("%.2x", p[i]);
        }
    }
    return 0;
}